package cn.zjutleo.village_server.mapper;

import cn.zjutleo.village_server.entity.RepairTeam;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: 张坤
 * @DateTime: 2021/8/31 14:39
 * @Description: 该类用于 TODO
 */
public interface RepairTeamMapper {
    @Select("select repair_team.*\n" +
            "from department_member,repair_team\n" +
            "where dm_department_id=#{dm_department_id} and rt_user_id=dm_user_id\n")
    @Results(id="Base_departmentMember_data",value = {
            @Result(property = "rt_user_id",  column = "rt_user_id",id = true),
            @Result(property = "rt_role",  column = "rt_role"),
            @Result(property = "rt_contact",  column = "rt_contact"),
            @Result(property = "rt_work",  column = "rt_work"),
            @Result(property = "rt_name",  column = "rt_name"),
    })
    List<RepairTeam> searchRepairTeamInfoByDepartmentId(Integer dm_department_id);
}
